<form id="edit-form" class="form-horizontal" role="form" data-toggle="validator" method="POST" action="">

    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Apply_code')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-apply_code" data-rule="required" class="form-control" name="row[apply_code]" readonly type="text" value="{$row.apply_code|htmlentities}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Goodssales_code')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-goodssales_code" data-rule="required" class="form-control" readonly name="row[goodssales_code]" type="text" value="{$row.goodssales_code|htmlentities}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Apply_data')}:</label>
        <div class="col-xs-12 col-sm-8">

            <dl class="fieldlist" data-template="scoreitemtpl" data-name="apply_data">
                <dd>
                    <ins style="width:20%">手机号</ins>
                    <ins style="width:30%">赠送积分</ins>
                    <ins style="width:30%">备注</ins>
                </dd>
                <dd>
                    <a href="javascript:;" class="btn btn-sm btn-success btn-append">
                        <i class="fa fa-plus"></i> 添加
                    </a>
                </dd>
                <textarea name="apply_data" class="form-control hide" cols="30" rows="5">{$row.apply_data|htmlentities}</textarea>
            </dl>
            
            <script id="scoreitemtpl" type="text/html">
                <dd class="form-inline">
                    <ins style="width:20%">
                        <input type="text" name="row[<%=name%>][<%=index%>][mobile]" class="form-control" data-rule="required;mobile" placeholder="请输入手机号" value="<%=row.mobile||''%>">
                    </ins>
                    <ins style="width:30%">
                        <input type="number" name="row[<%=name%>][<%=index%>][score]" class="form-control" data-rule="required;range(1~)" placeholder="请输入赠送积分" value="<%=row.score||''%>">
                    </ins>
                    <ins style="width:30%">
                        <input type="text" name="row[<%=name%>][<%=index%>][remark]" class="form-control" placeholder="请输入备注" value="<%=row.remark||''%>">
                    </ins>
                    <span class="btn btn-sm btn-danger btn-remove">
                        <i class="fa fa-times"></i>
                    </span>
                </dd>
            </script>
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Remark')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-remark" class="form-control" name="row[remark]" type="text" value="{$row.remark|htmlentities}">
        </div>
    </div>
    <div class="form-group layer-footer">
        <label class="control-label col-xs-12 col-sm-2"></label>
        <div class="col-xs-12 col-sm-8">
            <button type="submit" class="btn btn-primary btn-embossed disabled">{:__('OK')}</button>
        </div>
    </div>
</form>
